package cn.lingyangwl.agile.infra.module.group.model.rqrs;

import cn.lingyangwl.agile.model.constants.TreeCons;
import cn.lingyangwl.agile.model.constants.ValidationCons;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 通用数据组
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class DataGroupBase {
    @ApiModelProperty(value = "名称")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String name;

    @ApiModelProperty(value = "组类型")
    private String groupType;

    @ApiModelProperty(value = "每个数据分组类型下的组编码, 业务方自定义")
    @NotEmpty(message = ValidationCons.NOT_EMPTY, groups = { GroupCodeValidation.class })
    private String code;

    @ApiModelProperty(value = "组图标")
    private String icon;

    @NotNull(message = ValidationCons.NOT_EMPTY)
    @ApiModelProperty(value = "排序")
    private Integer sortNo = 1;

    @ApiModelProperty(value = "父id, 如果为顶级就是0")
    private Long parentId = TreeCons.ROOT_PARENT_ID;

    @ApiModelProperty(value = "备注")
    private String remark;
}
